#!/bin/bash
# Creditos do script ao Rafael Oliveira

execute() {
  classpath="../bin/compiler:../bin"
  folder=$1
  `rm $folder/*.log`
  for file in `ls $folder`
  do
    filename="$folder/$file"
    echo $filename
    `java -cp $classpath compiler.Compiler $filename > output/$filename.log`
  done
}

execute "small/1"
execute "small/2"
execute "small/3"
execute "small/4"
execute "large"
execute "simple"
